package com.brainshare.an.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.brainshare.common.annotation.Excel;
import com.brainshare.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 机构对象 an_mechanism
 * 
 * @author ruoyi
 * @date 2022-11-05
 */
@Data
public class AnMechanism extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long mechanismId;

    /** 机构名称 */
    @Excel(name = "机构名称")
    @NotNull(message = "请输入机构名称!")
    private String mechanismName;

    /** 银行账号 */
    @Excel(name = "银行账号")
    @NotNull(message = "请输入银行账号!")
    private String bankAccount;

    /** 开户行 */
    @Excel(name = "开户行")
    @NotNull(message = "请输入开户行!")
    private String bankName;

    /** 营业执照副本 */
    @Excel(name = "营业执照副本")
    @NotNull(message = "请上传营业执照副本!")
    private String businessLicense;

    /** 机构审核状态 */
    @Excel(name = "机构审核状态", readConverterExp = "0=待审核,1=通过认证,2=驳回认证")
    private Long examineStatus;

    /** 联系人 */
    @Excel(name = "联系人")
    @NotNull(message = "请输入联系人!")
    private String contactsName;

    /** 联系方式 */
    @Excel(name = "联系方式")
    @NotNull(message = "请输入联系方式!")
    private String contactsPhone;

    /** 申请认证时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请认证时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    /** 认证通过时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "认证通过时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date applyDoneTime;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private Long wechatUserId;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("mechanismId", getMechanismId())
            .append("mechanismName", getMechanismName())
            .append("bankAccount", getBankAccount())
            .append("bankName", getBankName())
            .append("businessLicense", getBusinessLicense())
            .append("examineStatus", getExamineStatus())
            .append("contactsName", getContactsName())
            .append("contactsPhone", getContactsPhone())
            .append("applyTime", getApplyTime())
            .append("applyDoneTime", getApplyDoneTime())
            .append("wechatUserId", getWechatUserId())
            .toString();
    }
}
